package com.cyzy.controller;

import com.cyzy.dto.Result;
import com.cyzy.pojo.Banner;
import com.cyzy.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 认养页面轮播图接口
 */
@RestController
@RequestMapping("/adopt-banner")
public class BannerController {
    
    @Autowired
    private BannerService bannerService;
    
    /**
     * 获取认养页面轮播图列表
     * @return 轮播图列表
     */
    @GetMapping("/list")
    public Result getAdoptBanners() {
        List<Banner> bannerList = bannerService.getAdoptBanners();
        return Result.ok().data("bannerList", bannerList);
    }
} 